import React from 'react'
import ReactDOM from 'react-dom'

class Title extends React.Component {
  render () {
    return <div>标题</div>
  }
}

class Content extends React.Component {
  render () {
    return <div>内容</div>
  }
}

class App extends React.Component {
  render () {
    // 类组件必写render函数
    // render函数必返回jsx代码
    // jsx代码等同于vue中结构 template
    return <div>
      <Title />
      <Content />
    </div>
  }
}

ReactDOM.render(
  <App />,
  document.getElementById('root')
)